<script src="/socket.io/socket.io.js"></script>
<script>
  var socket = io.connect('http://localhost:8080');
  socket.on('serverToclient', function (data) {
    console.log(data);
    socket.emit('clientToserver', {clientMsg: 'server, hello world' });
  });
</script>